package cn.tedu.jdbc;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Scanner;

/**
 * @Author: Miyako
 * @Date: 2024-07-30-18:04
 * @Description: 测试类
 */
public class UserTest01 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入您想测试的数据库名称");
        String dB = scanner.nextLine();
        System.out.println("输入用户名");
        String username = scanner.nextLine();
        try (Connection c = new DBUtil(dB).getConnection()) {
            //调用检查类的方法
//            new JDBCCheckDate(c).CheckIsExists(username);
//            System.out.println("输入密码");
//            String password = scanner.nextLine();
//            System.out.println("输入昵称");
//            String nickname = scanner.nextLine();
//            System.out.println("输入年龄");
//            int age = scanner.nextInt();
//            //调用注册类的注册方法
//            new JDBCRegiste(c).startRegiste(username, password, nickname, age);
            System.out.println("开始登录捏");
            System.out.println("输入用户名");
            String lUsername = scanner.nextLine();
            System.out.println("输入密码");
            String lPassword = scanner.nextLine();
            new JDBCCheckDate(c).CheckLoginDate(lUsername,lPassword);
        } catch (SQLException e) {
            e.printStackTrace();
        }


    }

     static void inputMessage(){

    }
}
